﻿

function Step(sid) {
  var form = document.getElementById("form1");
  var rst = false;
  switch (sid) {
    case 1:
      if (document.getElementById("LoginIDTxt").value != "") {
        form.action = "?act=l";
        rst = true;
      } else {
        alert("请填写登录名");
      }
      break;
    case 2:
      if (document.getElementById("AnswerTxt").value != "") {
        form.action = "?act=q";
        rst = true;
      } else {
        alert("请填写提示问题答案");
      }
      break;
    case 3:
      var pwd = document.getElementById("NewPwdTxt").value;
      var confirmPwd = document.getElementById("ConfirmNewPwdTxt").value;
      if (pwd != "" && confirmPwd != "" && pwd == confirmPwd && pwd.length >= 6 && pwd.length <= 12) {
        form.action = "?act=u";
        rst = true;
      } else {
        alert("请正确填写密码");
      }
      break;
    default: break;
  }
  return rst;
}